package com.dwj.auto.comment.controller;


import com.dwj.auto.comment.common.response.PageResponse;
import com.dwj.auto.comment.common.response.Response;
import com.dwj.auto.comment.model.form.ScoreForm;
import com.dwj.auto.comment.model.req.StuScoreCriteria;
import com.dwj.auto.comment.model.vo.StuScoreVo;
import com.dwj.auto.comment.service.IStuScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author dwjian
 * @since 2020-01-20
 */
@RestController
@RequestMapping("/api/score")
public class StuScoreController {

    @Autowired
    private IStuScoreService stuScoreService;

    @GetMapping("/get/list")
    public PageResponse<StuScoreVo> getList(StuScoreCriteria pagination){
        return stuScoreService.getList(pagination);
    }

    @PostMapping("/edit")
    public Response<String> edit(@RequestBody ScoreForm form){
        return stuScoreService.edit(form);
    }

}
